//
//  BSWidget.h
//  share_business
//
//  Created by 吴于凌 on 2017/8/26.
//  Copyright © 2017年 wyl. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "JSBadgeView.h"
#import <UIKit/UIKit.h>
@interface BSWidget : NSObject

//创建UILabel
+ (UILabel *)commonLableWithFrame:(CGRect)frame
                             text:(NSString *)text
                            color:(UIColor *)color
                             font:(float)fontSize;

//创建UITextField
+ (UITextField *)commonTextFieldWithFrame:(CGRect)frame
                              placeholder:(NSString *)placeholder
                                    color:(UIColor *)color
                                     font:(UIFont *)font
                          secureTextEntry:(BOOL)secureTextEntry
                                 delegate:(id)delegate;

//创建UITextView
+ (UITextView *)commonTextViewWithFrame:(CGRect)frame
                                   text:(NSString *)text
                                  color:(UIColor *)color
                                   font:(UIFont *)font
                          textAlignment:(NSTextAlignment)textAlignment;


//创建UIButton
+ (UIButton *)commonButtonWithFrame:(CGRect)frame
                              title:(NSString *)title
                              color:(UIColor *)color
                           fontSize:(float)fontSize
                             target:(id)target
                             action:(SEL)action;

//创建图片
+ (UIImageView*) commonImageViewWithFrame:(CGRect)frame
                                    image:(UIImage*)image;

//返回颜色图片
+ (UIImage *)createImageWithColor:(UIColor *)color size:(CGSize)size;

//设置右上角角标
+(void)addJSBadgeView:(UIView *)view title:(NSString *)title;
+(void)addJSBadgeViewWithY:(UIView *)view title:(NSString *)title y:(float)y ;
+(void)addJSBadgeViewSmall:(UIView *)view title:(NSString *)title ;

@end
